package com.iwhalecloud.bss.kite.cucc.web.controller.order;

import com.iwhalecloud.bss.kite.client.dto.DataResult;
import com.iwhalecloud.bss.kite.common.constant.ErrorConsts;
import com.iwhalecloud.bss.kite.cucc.client.api.flow.IFlowService;
import com.iwhalecloud.bss.kite.cucc.client.dto.flow.FlowTrackInfo;
import com.iwhalecloud.bss.kite.cucc.client.dto.flow.FlowTrackReq;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/flow")
@Api(tags = { "/flow - 流程信息" })
public class FlowController {

	@Autowired
	private IFlowService flowService;

	/**
	 * 查询流程轨迹信息
	 * @author zhang.song
	 * @date 2021-04-21 16:31
	 * @param flowTrackReq
	 * @return com.iwhalecloud.bss.kite.client.dto.DataResult<com.iwhalecloud.bss.kite.cucc.client.dto.flow.FlowTrackInfo>
	 */
    @PostMapping("/getFlowTrack")
    public DataResult<FlowTrackInfo> getFlowTrack(@RequestBody FlowTrackReq flowTrackReq) {
        return ErrorConsts.SUCCESS.getResult(flowService.getFlowTrack(flowTrackReq));
    }
}
